In known systems including a memory that handles real time data streams, memory buffers are implemented in conjunction with the memory to handle the real time data stream. For example, a real time data stream is handled by a memory of a computer system when the memory receives and temporarily stores video data. The video data may be received from graphics processing circuitry (e.g., a graphics coprocessor, a general purpose microprocessor that can perform graphics operations, etc.), from a video capture device (e.g., a video camera, etc.), from a communications network (e.g., a cable network, the Internet, etc.), and other known video data sources. After the video data is temporarily stored by the memory, it may be read from the memory and sent to a video display, to data storage (e.g., a hard disk, a Digital Versatile Disk (DVD), etc.), over a communications network, etc.
A memory service interruption can result in the memory being unable to handle real time data streams. Memory buffers may be implemented to handle the real time data streams during the memory service interruptions. For example, a memory buffer can be implemented to receive video data. Video data to be written to a memory can be received by a write memory buffer, which temporarily holds received video data until the video data can be written to the memory. Likewise, video data to be read from a memory may be sent to a read memory buffer, which temporarily holds the read video data until the video data is sent to a video display.
Memory buffers can be sized to handle the memory data demands that can occur during a memory service interruption. For example, a read memory buffer (i.e., read buffer) can have a physical capacity of two kilobytes to hold 256 quadwords (a quadword can correspond to eight bytes). The read buffer also can have a watermark with a set value. The watermark value may equal the number of valid data entries (e.g., quadwords, bytes, etc.) that the buffer should contain prior to a memory service interruption. For example, when 192 data entries are to be read from the memory buffer during the pendency of a worst case memory service interruption, then the watermark of the read buffer can be set at 192 data entries.
FIG. 1 is an illustration of the operation of a known memory buffer. Memory buffer 100 is a read buffer with a physical capacity of holding 144 data entries. Memory buffer 100 is operated with a watermark 101. The watermark 101 has a value corresponding to 100 data entries. Memory buffer operations can be performed to read data entries from the memory into the read buffer such that the read buffer typically is filled to the watermark level (e.g., has at least 100 data entries). When the number of data entries in the read buffer falls below the watermark level (e.g., less than 100 data entries), then high priority, short burst size data requests 102 can be generated to read data entries from the memory into the read buffer. When the number of data entries in the read buffer is equal to or greater than the watermark level (e.g., 100 or more data entries), then low priority, long burst size data requests 103 can be generated to continue to fill the read buffer.
Thus, known memory buffers that handle real time data streams can be filled and allowed to drain to a watermark. The value of the watermark can be set so that the buffer can sustain the worst case latency to memory. Known systems can have both a worst case latency to memory and a regular memory latency. System performance can be disadvantageously affected when memory service interruptions occur, but memory buffer operations are performed to keep the memory buffer at watermark corresponding to the worst case latency to memory. Maintaining a watermark at a higher level can disadvantageously affect system performance by generating a greater number of high priority, short burst size data requests, which can result in a lower page hit rate to memory.
In view of the foregoing, it can be appreciated that a substantial need exists for a method and apparatus which can more efficiently and effectively manage memory buffer operations.